/**
 * @description:项目参数校验
 * @version: 0.0.1
 * @author: z..
 * @Date: 2023-06-08 14:07:35
 */

import { Rule, RuleType } from '@midwayjs/validate';
import { requiredNumber, requiredString } from "./common";

// 项目列表分页查询参数校验
export class CreatedProjDTO {
  @Rule(requiredString)
  projectName: string;
  @Rule(RuleType.any())
  projectContent: any;
  @Rule(requiredString)
  projectProgress: string;
  @Rule(requiredString)
  projectType: string;
  @Rule(RuleType.any())
  userId: any;
  @Rule(RuleType.any())
  userName: any;
  @Rule(RuleType.any())
  orderId: any;
  @Rule(RuleType.any())
  brandName: any;
}
// 修改项目数据
export class UpdatedProjDTO extends CreatedProjDTO {
  @Rule(requiredNumber)
  id: number;
}

// 获取项目详情
export class UpdateProjOrderContactDTO {
  @Rule(requiredNumber)
  projId: number;
  @Rule(requiredNumber)
  orderId: number;
  @Rule(requiredNumber)
  isBind: number;
}

//  分页
export class PageByOrderDTO {
  @Rule(requiredNumber)
  pageSize: number;
  @Rule(requiredNumber)
  pageNum: number;
  @Rule(RuleType.any())
  searchKey: any;
  @Rule(RuleType.any())
  orderId: any;
}